package cn.com.visionsky.bocsz.bda.webservice.util;

import cn.com.visionsky.bocsz.bda.webservice.handler.Handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/**
 * Created by 46043 on 2016/10/24.
 */
@Component
public class SpringHelper {
    private static final Logger logger = LoggerFactory
            .getLogger(SpringHelper.class);

	@Autowired
	private ApplicationContext applicationContext;

	public Handler getHandler(String handlerId) {
		return (Handler)applicationContext.getBean(handlerId);
	}



}
